package com.baor.finance.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baor.finance.mapper.Refund2Mapper;
import com.baor.finance.domain.Refund;
import com.baor.finance.service.IRefundService;

/**
 * 会员退款Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-18
 */
@Service
public class Refund2ServiceImpl implements IRefundService
{
    @Autowired
    private Refund2Mapper refundMapper;

    /**
     * 查询会员退款
     * 
     * @param refundId 会员退款主键
     * @return 会员退款
     */
    @Override
    public Refund selectRefundByRefundId(Long refundId)
    {
        return refundMapper.selectRefundByRefundId(refundId);
    }

    /**
     * 查询会员退款列表
     * 
     * @param refund 会员退款
     * @return 会员退款
     */
    @Override
    public List<Refund> selectRefundList(Refund refund)
    {
        return refundMapper.selectRefundList(refund);
    }

    /**
     * 新增会员退款
     * 
     * @param refund 会员退款
     * @return 结果
     */
    @Override
    public int insertRefund(Refund refund)
    {
        return refundMapper.insertRefund(refund);
    }

    /**
     * 修改会员退款
     * 
     * @param refund 会员退款
     * @return 结果
     */
    @Override
    public int updateRefund(Refund refund)
    {
        return refundMapper.updateRefund(refund);
    }

    /**
     * 批量删除会员退款
     * 
     * @param refundIds 需要删除的会员退款主键
     * @return 结果
     */
    @Override
    public int deleteRefundByRefundIds(Long[] refundIds)
    {
        return refundMapper.deleteRefundByRefundIds(refundIds);
    }

    /**
     * 删除会员退款信息
     * 
     * @param refundId 会员退款主键
     * @return 结果
     */
    @Override
    public int deleteRefundByRefundId(Long refundId)
    {
        return refundMapper.deleteRefundByRefundId(refundId);
    }

    @Override
    public int changeType(Long refundId) {
        return refundMapper.changeRefundStatus(refundId);
    }

    @Override
    public int changeType2(Long refundId) {
        return refundMapper.changeRefundStatus2(refundId);
    }
}
